<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@include file="/pages/common/taglibs.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
	<title>广东工业大学招生办-在线咨询</title>
	<link rel="stylesheet" type="text/css" href="${ctx}/css/reset.css" />
	<link rel="stylesheet" type="text/css" href="${ctx}/css/common.css" />
	<link rel="stylesheet" type="text/css" href="${ctx}/css/home.css" />
	<link rel="stylesheet" type="text/css" href="${ctx}/css/page.css" />
	<script type="text/javascript" src="${ctx }/js/showTime.js"></script>
	<script type="text/javascript" src="${ctx }/js/jquery.js"></script>
    <script type="text/javascript" src="${ctx }/js/jquery.form.js"></script>
<script type="text/javascript">
	function sendMessage(){
	
	if(messageform.name.value=="")
	{
		alert("姓名不能为空!");
		messageform.name.focus();
		return false;
		}
		if(messageform.comefrom.value=="")
	{
		alert("来自不能为空!");
		messageform.comefrom.focus();
		return false;
		}
		if(messageform.type.value=="")
	{
		alert("类型不能为空!");
		messageform.type.focus();
		return false;
		}
	var iu, iuu, regArray=new Array("哼","屌", "干", "日", "叼",
 "老母", "靠", "去你","你妹", "干你妹", "妈","逼","党","操","尼玛","草","我去","天朝","丫的",
 "滚", "垃圾","扑街", "卜街", "全家","死","cao","shit");
   iuu=regArray.length;
   var obj=document.getElementById("content");
   if(obj.value=="")
   {
     alert("内容不能为空");
      obj.focus();
      return false;
   }
   for(iu=1;iu<=iuu;iu++)
   {   
      if(regArray[iu] !="")
       {
          if (obj.value.indexOf(regArray[iu])!=-1)
           {
             alert("请文明用语，敏感字：" + regArray[iu]);
             document.messageform.content.focus();
             return false;
          }
        }
   }
   document.all.butt.style.display= "none";
  	document.all.res.style.display= "none";
    var d=$("#messageform").serialize();
    $.post("${ctx}/base/message!save.action", d ,function callback(text){
   						$('messageform').submit();
             			alert("留言成功，请注意回复！");
             			 window.location.href="${ctx}/base/message.action";
             	});
             		
       
	}
	

             

</script>
</head>
<body>
	<div class="wrapper">
		<jsp:include page="../../../header.jsp" flush="true" /> 

		<!--main-content-->
		<form action="#" method="post" name="messageform" id="messageform" >
		<div id="main-content-child-page" class="w960 auto">
			<!--Breadcrumb Trail-->
			<div class="breadcurmb-trail mt5 mb10">
				您的位置：<a href="${ctx}/index.html">网站首页</a>-在线咨询
			</div>
			
			<div class="content clearfix">
				<div class="advisory-content">
					<div class="asking-area">
						<div class="advisory-header-bg"></div>
						<div class="advisory-header-image l"></div>
						<div class="asking-area-content rel">
								<div class="">姓名：<input type="text" name="entity.name" id="name"/></div>
								<div class="abs" style="left:225px; *left:175px; _left:175px; top:0;">来自：
								<select id="comefrom" name="entity.comeFrom">
									<option value="广东省">广东省</option>
									<option value="北京市">北京市</option>
									<option value="天津市">天津市</option>
									<option value="上海市">上海市</option>
									<option value="重庆市">重庆市</option>
									<option value="河北省">河北省</option>
									<option value="河南省">河南省</option>
									<option value="云南省">云南省</option>
									<option value="辽宁省">辽宁省</option>
									<option value="黑龙江省">黑龙江省</option>
									<option value="湖南省">湖南省</option>
									<option value="安徽省">安徽省</option>
									<option value="山东省">山东省</option>
									<option value="新疆维吾尔">新疆维吾尔</option>
									<option value="江苏省">江苏省</option>
									<option value="浙江省">浙江省</option>
									<option value="江西省">江西省</option>
									<option value="湖北省">湖北省</option>
									<option value="广西壮族">广西壮族</option>
									<option value="甘肃省">甘肃省</option>
									<option value="山西省">山西省</option>
									<option value="内蒙古">内蒙古</option>
									<option value="陕西省">陕西省</option>
									<option value="吉林省">吉林省</option>
									<option value="福建省">福建省</option>
									<option value="贵州省">贵州省</option>
									<option value="青海省">青海省</option>
									<option value="西藏">西藏</option>
									<option value="四川省">四川省</option>
									<option value="宁夏回族">宁夏回族</option>
									<option value="海南省">海南省</option>
									<option value="台湾省">台湾省</option>
									<option value="香港特别行政区">香港特别行政区</option>
									<option value="澳门特别行政区">澳门特别行政区</option>
								</select>
								</div>	
								<div class="mt10">科类：
									<select name="entity.type" id="type">
									<option value="理科">理科</option>
									<option value="文科">文科</option>
									<option value="艺术类">艺术类</option>
									</select>
								</div>				
								<div class="asking-area-text">
									<p class="l mt10">内容：</p>
									<textarea class="mt20" name="entity.content" id="content"></textarea>
								</div>
								<div class="asking-area-text-buttom mt20" style="margin-left:85px;"><input class="academy-analogy_buttom academy-analogy_buttom_add" value="提交" type="button" name="butt" onclick="return sendMessage();"/>
								<input class="academy-analogy_buttom academy-analogy_buttom_add" name="res" type="reset" value="重置" /></div>
                        </div>
                        <div class="asking-area-bg"></div>
					</div>	
				</div>
			</div>
		</div>
		
			</form>
				<jsp:include page="../../../footer.jsp" flush="true" /> 
	</div>	
</body>
</html>